﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Abp.Application.Services;
using FwProject.FactoryInfo.Dto;
using Microsoft.AspNetCore.Mvc;

namespace FwProject.FactoryInfo
{
    public interface IFactoryNameInfoAppService: IApplicationService
    {
        /// <summary>
        /// 添加一个工厂
        /// </summary>
        /// <returns>The create.</returns>
        /// <param name="input">Input.</param>
        Task<Guid> Create(FactoryNameInfoInput input);

        /// <summary>
        /// 修改工厂信息
        /// </summary>
        /// <returns>The create.</returns>
        /// <param name="input">Input.</param>
        /// 
        Task Update(Guid id, FactoryNameInfoInput input);
        /// <summary>
        /// 返回工厂信息
        /// </summary>
        /// <returns>The by identifier async.</returns>
        /// <param name="id">Identifier.</param>

        Task Delete(Guid id);

        [HttpGet]
        Task<FactoryNameInfoDto> GetByIdAsync(Guid id);
        /// <summary>
        /// 获取工厂列表
        /// </summary>
        /// <returns>The paged list async.</returns>
        /// <param name="id">工厂编号</param>

        [HttpGet]
        Task<X.PagedList.IPagedList<FactoryNameInfoDto>> GetPagedListAsync(int pageIdx, int pageSize, DateTime? begindateTime, DateTime? enddatetime,string keyword);

        /// <summary>
        /// 获取所有工厂列表
        /// </summary>
        /// <returns></returns>
        Task<List<FactoryNameInfoDto>> GetAllAsync(string keyword);

        /// <summary>
        /// 获取工厂树
        /// </summary>
        /// <returns></returns>
        Task<List<FactoryJSTreeOutputDto>> GetFactoryTreeAsync(bool isType);
    }
}
